"""
w文件操作模块
"""


def write_file(file, message):
    """
    往文件中追加日志，如果文件不存在，就创建文件
    :return:
    """
    with open("./logs/log.txt", "a+", 1024, encoding="UTF-8", newline="\r\n") as file_obj:
        file_obj.write(message + "\r")


if __name__ == "__main__":
    write_file("../logs/log.txt", "打印日志")
